package com.yegs.hospital.service;

import com.yegs.hospital.common.PageVo;
import com.yegs.hospital.vo.WxUser;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;

import javax.transaction.Transactional;
import java.util.List;

public interface UserService {

    WxUser login(String jsCode) throws WxErrorException;

    WxUser login(String username, String password) throws WxErrorException;

    WxUser findByOpenId(String openId);

    @Transactional(rollbackOn = Exception.class)
    void save(WxUser wxUser) throws Exception;

    PageImpl<WxUser> list(PageVo<WxUser> page);


}
